package com.xique.client.bean.transform;

import com.xique.client.bean.domain.ParkInfo;
import com.xique.client.bean.domain.SysUser;
import com.xique.client.bean.vo.WxAppSysUserVO;

/**
 * @author shd
 * @create 2021/11/3 14:05
 */
public class WxAppUserTransform {

    public static WxAppSysUserVO transformWxAppSysUserVO(SysUser user, ParkInfo parkInfo) {
        WxAppSysUserVO vo = new WxAppSysUserVO();

        vo.setUserId(user.getUserId());
        vo.setUserName(user.getUserName());
        vo.setPhone(user.getPhonenumber());
        vo.setAvatar(user.getAvatar());
        vo.setParkId(parkInfo.getId());
        vo.setParkName(parkInfo.getName());
        vo.setParkNature(parkInfo.getParkNature());
        vo.setPrincipal(parkInfo.getPrincipal());
        vo.setPrincipalPhone(parkInfo.getPrincipalPhone());
        vo.setServicePhone(parkInfo.getServicePhone());
        vo.setAddress(parkInfo.getProvince() + parkInfo.getCity() + parkInfo.getDistrict() + parkInfo.getAddress());

        return vo;
    }

}
